package main

import (
	"fmt"
	"github.com/go-redis/redis"
	"time"
)

func main() {
	o := redis.Options{Addr: "172.16.8.181:6379",
		Password: "888",
		DB:       10,
	}
	c := redis.NewClient(&o)
	_, e := c.Ping().Result()
	if e != nil {
		fmt.Println("连接失败")
	}
	r := c.Set("kk", "9999", 5000*time.Second)
	fmt.Println(r.String())
	a, _ := c.Get("kk2").Result()

	fmt.Println(a)
}
